import { withInstall } from '@ibiz-template/vue3-util';
import { registerGridColumnProvider } from '@ibiz-template/runtime';
import { GridFieldColumn } from './grid-field-column';
import { GridFieldColumnProvider } from './grid-field-column.provider';

export const IBizGridFieldColumn = withInstall(GridFieldColumn, v => {
  v.component(GridFieldColumn.name!, GridFieldColumn);
  registerGridColumnProvider(
    'DEFGRIDCOLUMN',
    () => new GridFieldColumnProvider(),
  );
  registerGridColumnProvider(
    'DEFTREEGRIDCOLUMN',
    () => new GridFieldColumnProvider(),
  );
});